#include <retro.h>
#include "retro.creator.h"

using namespace Retro::Creator::GUI;

VOID    Component::sendNotify(UINT iValue)
{
  NMHDR data;

  data.code       = iValue;
  data.hwndFrom   = *this;
  data.idFrom     = getID();

  SendMessage(
    mNotifyWindow ? mNotifyWindow : getParent(),
    WM_NOTIFY,
    getID(),
    (LPARAM)&data);
}

VOID    Component::sendNotify(NMHDR& iValue)
{
  iValue.hwndFrom   = *this;
  iValue.idFrom     = getID();

  SendMessage(
    mNotifyWindow ? mNotifyWindow : getParent(),
    WM_NOTIFY,
    getID(),
    (LPARAM)&iValue);
}
